-- GENERATED SPELL FOR [Force-Commander Gorax] --


function spell0_19264(pUnit, Event) --@Blade Flurry,Self--
pUnit:FullCastSpellOnTarget(33735,pUnit)
pUnit:RegisterEvent('Sorts_19264', 15285, 1)
end

function spell1_19264(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(24193,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19264', 2250, 1)
end

function spell2_19264(pUnit, Event) --@Create Gorax Corpse Spell Focus,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(39012,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_19264', 1, 1)
end

function spell3_19264(pUnit, Event) --@Hamstring,n/a--
pUnit:FullCastSpellOnTarget(9080,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19264', 10333, 1)
end

function spell4_19264(pUnit, Event) --@Toughen,Self--
pUnit:FullCastSpellOnTarget(33962,pUnit)
pUnit:RegisterEvent('Sorts_19264', 637, 1)
end

function Sorts_19264(pUnit, Event)
local choix_sorts_19264 = math.random(0, 4)
if choix_sorts_19264 == 0 then
pUnit:RegisterEvent('spell0_19264', 1, 1)
end
if choix_sorts_19264 == 1 then
pUnit:RegisterEvent('spell1_19264', 1, 1)
end
if choix_sorts_19264 == 2 then
pUnit:RegisterEvent('spell2_19264', 1, 1)
end
if choix_sorts_19264 == 3 then
pUnit:RegisterEvent('spell3_19264', 1, 1)
end
if choix_sorts_19264 == 4 then
pUnit:RegisterEvent('spell4_19264', 1, 1)
end
end

function mob19264_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19264', math.random(1500, 3000), 1)
end

function mob19264_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19264_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19264_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19264, 1, 'mob19264_Action')
RegisterUnitEvent(19264, 2, 'mob19264_Leave')
RegisterUnitEvent(19264, 3, 'mob19264_Kill')
RegisterUnitEvent(19264, 4, 'mob19264_Die')
